from django.shortcuts import render

# Create your views here.

from .models import *
from .ser import *
from rest_framework.views import APIView
from rest_framework.views import Response
from  django.core.paginator import Paginator

class JournalismM(APIView):
    def post(self,request):
        datas = JournalismSer(data=request.data)
        if datas.is_valid():
            datas.save()
            return Response({"code":200,"list":datas.data})
        else:
            print(datas.errors)
            return Response({"code":10010})

